A database management system is a software application whose function is to interface between a database and any applications/processes requesting access to the database. In general, a database management system provides for the organization of, access to, and control of a database.
A database is a collection of logically organized data items. A database is organized into tables, each table having one or more records contained therein. Each record, in turn, is divided into one or more fields. From a visual perspective, the table may be referred to as a view. The rows of a view are related to the records of the database. The columns of a view are related to the fields of the records. The terms "record" and "row" will be used interchangeably herein, as will the terms "field" and "column".
Referring initially to FIG. 1, a visual representation of a database table, generally designated 10 is illustrated. As shown, table 10 is visually represented by a base view generally designated 20. Table 10 comprises records 11 which are divided into fields 12. In base view 20 the rows 21 and columns 22 correspond to records 11 and fields 12, respectively.
The present invention, while applicable to any database environment, has been implemented in a distributed real-time data processing system comprising two or more data processing systems which are capable of functioning independently but which are so coupled as to send and receive messages to and from each other.
A local area network (LAN) is an example of a distributed data processing system. A typical LAN comprises a number of autonomous data processing "nodes", each comprising at least a processor and memory. Each node is capable of conducting data processing operations independently. In addition, each node is coupled to a network of other nodes which may be, for example, a loop, star, tree, etc., depending upon the design considerations.
A "process", as used herein, is a self-contained package of data and executable procedures which operate on that data, comparable to a "task" in other known systems. Within the present invention a process can be thought of as comparable to a set (module) of subroutines in terms of size, complexity, and the way it is used. The difference between processes and subroutines is that processes can be created and terminated dynamically and can execute concurrently with their creator and other sets (modules) of "subroutines".
Every process in the distributed data processing system of the present invention has a unique identifier connector by which it can be referenced. The connector is assigned by the system when the process is created. The connector is used by the system to physically locate the process.
Every process also has a non-unique, symbolic "name", which is a variable-length string of characters. In general, the name of a process is known system-wide. To restrict the scope of names, the concept of a "context" is utilized. This concept is described in detail in copending U.S. patent applications having Ser. Nos. 000,621 and 000,624 referenced above. Basically, a context is a collection of related processes whose names are not known outside of the context.
A process in one context cannot symbolically communicate with, and does not know about, processes inside other contexts. All interaction across boundaries is by means of messages and is gated through a "context process".
A "message" is a variable-length buffer containing data which tells a process what to do and/or supplies it with information it needs to carry out its operation. Messages are queued from one process to another by name or connector. Queuing avoids potential synchronization problems and is used instead of semaphores, monitors, etc. The sender of the message is free to continue after the message is sent. When the receiver attempts to get the message, it will be suspended until one arrives if none are already waiting in its queue. Optionally, the sender can specify that it wants to wait for a reply and is suspended until the specific message arrives. Messages from any other source are not dequeued until after that happens.
Messages provide the mechanism by which user transparency is achieved. A process located anywhere in the system may send a message to any other process anywhere within the system if the sending process has the receiving process's name or connector. This permits processes to be dynamically distributed across the system at any time and to gain optimal throughput without changing the processes to which they are referenced. Sending messages by connector obviates the need for a name search and ignores context boundaries. This is the most efficient method of communicating.
In the present invention messages generally comprise a message ID and one or more "triples". The message ID is a word describing the purpose of the message (e.g. status) or the request (e.g. GET) encoded in it. A triple is a data portion comprising three fields. The first field generally identifies the type of triple. The second field indicates how many bytes of information are contained in the third field, which may be zero (0). The third field contains the data of the message, such as a process status code.
FIG. 2 shows a schematic representation illustrating a prior art database transaction. Known synchronous database management systems do not function effectively to support real-time applications. In a known database management system, a real-time application process, such as Producer process P1 in FIG. 2, generates data. Process P1 sends a message m1 to Consumer process P2. In the system shown in FIG. 2, Producer process P1 then suspends its operation until Consumer process P2 returns a message m2. During the time Producer process P1 was suspended, no data was being received from it. This known type of database management system is referred to as a synchronous database management system.
FIG. 3 shows a schematic representation illustrating an asynchronous database transaction according to the present invention. According to the present invention, which is capable of operating in either a synchronous or an asynchronous mode, when a Producer process such as process P3 in FIG. 3 sends a message m3 to Consumer process P4, Producer process P3 does not have to suspend its operation. It can continue to process data while waiting for Consumer process P4 to handle messages transmitted to it. When Consumer process P4 has formulated a reply message m4, it sends it to a "mailbox" 5 associated with Producer process P3. Producer process P3 may read reply message m4 from mailbox 5 when it has an opportunity.
FIG. 4 shows a schematic representation illustrating a database transaction in greater detail according to the present invention. A Physical Device (PD) 30 generates data to a database management system application process 31, which sends related information in the form of a message m5 to database management system 32. Database management system 32 controls the storage and retrieval of related information in database 33.
FIG. 5 shows a graph of physical device (PD) data output versus time. The real-time data output of PD 30 is represented by fluctuating line 34. Dotted line 36 represents the ability of DMS 32 (the Consumer process) to process and store information in DB 33. The problem with prior art database management systems, such as that shown in FIG. 1, is that the Consumer process was incapable of handling peak data outputs or "bursts" 37 and 39 from the Producer process, so such data was lost.
Thus there is a need to provide in a real-time database management system the capability of operating in an asynchronous mode, so that a Producer process can send data to a Consumer process, especially during peaks or bursts of data being transmitted by the Producer process to the Consumer process, so the Producer process and the Consumer process can continue processing without halting their operations.
In the present invention, data sent by a Producer process to a Consumer process is buffered, for example in high speed memory, so that no data is lost.
Asynchronous processing and the use of buffer stores are known in the data processing arts, particularly in teleprocessing and in file-oriented applications. However, the employment of asynchronous processing techniques in the field of real-time database management systems is not presently known.
With the asynchronous real-time database management system herein disclosed, in which earlier transmitted data may be buffered simultaneously with later transmitted data, there exists a potential for confusing early data with later data. Therefore, there is a need to identify or "tag" the data which is stored in the buffers. In addition, there is a need to generate a notification to either or both the Producer process and the Consumer process of any error occurring in the data transfer operation.
Accordingly, it is an object of the present invention to provide a method for operating a real-time database management system in an asynchronous mode that overcomes the above deficiencies.
A further object of the present invention is to provide a method for tagging information emanating from a specific Producer process.
These and other objects are achieved in accordance with a preferred embodiment of the invention by providing in a database management system, a method for receiving and storing data in a database comprising the steps of: a) receiving a first portion of the data; b) placing the first portion of the data in a first of a plurality of data buffers; c) transferring the first portion of data from the first buffer into the database while receiving a second portion of the data and placing the second portion of the data in a second of a plurality of data buffers; and d) transferring the second portion of data from the second buffer into the database.